package com.zuikaku.nettychat.netty.vo;

public enum MethodType {
    NONE(0,"none"),
    TEST(1,"test"),
    SENDSMS(2,"sendSMS"),
    REGISTER(3,"register"),
    LOGIN(4,"login"),
    SEARCH_FRIEND(5,"searchFriend"),
    ADD_Friend(6,"addFriend"),
    NOTICE_ADD_FRIEND(7,""),
    REPLY_ADD_FRIEND(8,"replyAddFriend"),
    QUERY_FRIEND_LIST(9,"queryFriendList"),
    QUERY_CHAT_LIST(10,"queryChatList"),
    START_CHAT(11,"startChat"),
    SEND_MSG(12,"sendMsg"),
    RECEIVE_MSG(13,"")
    ;


    private int value;
    private String methodName;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    MethodType() {
    }

    MethodType(int value, String methodName) {
        this.value = value;
        this.methodName = methodName;
    }

    public static MethodType getMethodTypeByNum(int num){
        switch (num){
            case 0:
                return MethodType.NONE;
            case 1:
                return MethodType.TEST;
            case 2:
                return MethodType.SENDSMS;
            case 3:
                return MethodType.REGISTER;
            case 4:
                return MethodType.LOGIN;
            case 5:
                return MethodType.SEARCH_FRIEND;
            case 6:
                return MethodType.ADD_Friend;
            case 7:
                return MethodType.NOTICE_ADD_FRIEND;
            case 8:
                return MethodType.REPLY_ADD_FRIEND;
            case 9:
                return MethodType.QUERY_FRIEND_LIST;
            case 10:
                return MethodType.QUERY_CHAT_LIST;
            case 11:
                return MethodType.START_CHAT;
            case 12:
                return MethodType.SEND_MSG;
            case 13:
                return MethodType.RECEIVE_MSG;

        }
        return null;
    }
}
